home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / libs / cwrlib31.lha / cwritelib.h < prev    next >
C/C++ Source or Header  |  1992-07-22  |  2KB  |  82 lines

  1. /* cwritelib.h
  2.  * prototypes and pragmas for our functions
  3.  * Note - the linker lib (starlib.lib) is not required
  4.  * if pragmas are used.
  5.  */
  6.  
  7. #ifndef CWRITELIB_H
  8. #define CWRITELIB_H
  9.  
  10. /* pragmas for our cwrite.library functions */
  11. #pragma libcall CwrlibBase CWriteInit 1E 9802
  12. #pragma libcall CwrlibBase CWrite 24 09803
  13. #pragma libcall CwrlibBase CWriteAlloc 2A 0
  14. #pragma libcall CwrlibBase CWriteFree 30 801
  15. #pragma libcall CwrlibBase CWriteCursorType 36 0802
  16. #pragma libcall CwrlibBase CWriteOpenWindow 3C 3210805
  17. #pragma libcall CwrlibBase CWriteCloseWindow 42 801
  18. #pragma libcall CwrlibBase CWriteSetColors 48 801
  19.  
  20. /****************************************************************************
  21.    The following structure is for *PRIVATE USE ONLY*!
  22.    The only thing it should be used for, is to handle the pointer over to
  23.    the library, that then will use the things.
  24.    None of the values should be altered, unless you are very sure of what
  25.    you are doing. - Doing so is on your own risk.
  26. */
  27. struct CwrData{
  28.     APTR    *Screen;        /* Pointer to the window's screen    */
  29.     APTR    *Window;        /* Pointer to the window            */
  30.     APTR    *BitMap;        /* Pointer to the window's bitmap    */
  31.     APTR    *RastPort;        /* Pointer to the window's rastport    */
  32.     APTR    *Font;            /* Pointer to the window's font        */
  33.     WORD    XPos;            /* Current X-position                */
  34.     WORD    YPos;            /* Current Y-position                */
  35.  
  36.     LONG    JumpAddress;        /* The rest of this stuff, is for    */
  37.     LONG    String;            /* internal use only! DO NOT ALTER!    */
  38.     LONG    TxtStyle;        /* Use CWriteInit() instead, if you    */
  39.     WORD    RestoreX;        /* have changed the window limits.    */
  40.     WORD    RestoreY;
  41.     WORD    Length;
  42.     WORD    Lines;
  43.     WORD    Rows;
  44.     WORD    Wy;
  45.     WORD    ScreenH;
  46.     WORD    ScreenW;
  47.     WORD    CharX;
  48.     WORD    CharY;
  49.     WORD    BaseLine;
  50.     WORD    No_of_bytes;
  51.     WORD    BufCount;
  52.     WORD    Color;
  53.     WORD    SaveColor;
  54.     UBYTE    Byte;
  55.     UBYTE    Bold;
  56.     UBYTE    Flags;
  57.     UBYTE    ScrByte;
  58.     UBYTE    CursorType;
  59.     UBYTE    Unused;        /* Padding character    */
  60.     UWORD    CursorPtrn[2];
  61.     UWORD    AreaPtrn[2];
  62.     UBYTE    Buffer[100];
  63. };
  64.  
  65. #define CURSORTYPE_NONE        0
  66. #define CURSORTYPE_FAST        1
  67. #define CURSORTYPE_SLOW        2
  68. #define CURSORTYPE_GHOSTED    3
  69.  
  70. /* protos for our cwrite.library functions */
  71.  
  72. VOID CWrite(struct CwrData*,UBYTE*,int);
  73. VOID CWriteInit(struct CwrData*,struct Window*);
  74. struct CwrData *CWriteAlloc(VOID);
  75. VOID CWriteFree(struct CwrData*);
  76. VOID CWriteCursorType(struct CwrData*,UBYTE);
  77. struct Window *CWriteOpenWindow(UBYTE*,int,int,int,BOOL);
  78. VOID CWriteCloseWindow(struct Window*);
  79. VOID CWriteSetColors(struct Window*);
  80.  
  81. #endif
  82.